M=50; N=100; words=[56,56,237,912,808,180,56,503,272,535,34,808,180,871,237,237,535,34,845,56,272,272,503,729,845,808,845,287,503,535,180,808,871,272,808,425,34,457,180,34,762,432,448,424,424,237,155,503,885,885,739,56,237,272,393,729,759,123,696,729,155,565,448,184,500,571,465,413,326,693,808,377,138,155,911,871,582,180,762,759,348,394,912,794,348,716,845,551,682,659,696,424,914,412,457,941,914,404,926,845];